home *** CD-ROM | disk | FTP | other *** search
- Path: rcp6.elan.af.mil!rscernix!danpop
- From: danpop@mail.cern.ch (Dan Pop)
- Newsgroups: comp.lang.c
- Subject: Re: __argv[0] bug under Win 95?
- Date: 10 Mar 96 00:11:08 GMT
- Organization: CERN European Lab for Particle Physics
- Message-ID: <danpop.826416668@rscernix>
- References: <4hr196$1hl@murphy2.servtech.com>
- NNTP-Posting-Host: ues5.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- In <4hr196$1hl@murphy2.servtech.com> Terry Carmen <tpcarmen@servtech.com> writes:
-
- >For some reason __argv[0] is empty under Windows 95, but contains the program name
- >and path as it should under Win 3.1x and Win NT.
-
- So what. There is no such thing as __argv[0] in the C language. If you
- name the second argument of main() __argv, you invoke undefined behaviour,
- because this symbol is not in your namespace.
-
- >Does anybody have any idea why, or how I can obtain the name of the currently
- >executing (16 bit) app under Win 95?
-
- As far as C is concerned, argv[0] is not required to contain the
- program name, so there's nothing to be done if it doesn't.
-
- For a Windows-specific solution, this is the wrong newsgroup.
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-